<?php /* Smarty version 2.6.18, created on 2012-05-16 22:30:10
         compiled from ajax/account-basic-bmi.tpl */ ?>
<form method="post" id="frmBMI" name="frmBMI" action="<?php echo @HOST_VFRIEND; ?>
account/basicsave" enctype="multipart/form-data">
    <input type="hidden" name="ptsave" id="ptsave" value="<?php echo $this->_tpl_vars['intType']; ?>
" />
	<div class="editForm">    	
        <div class="userInput">
        	<label>Chiều cao (cm):</label>
            <input type="text" name="pheight" id="pheight" value="<?php if (isset ( $_SESSION['st_height'] )): ?><?php echo $_SESSION['st_height']; ?>
<?php else: ?><?php echo $this->_tpl_vars['objUser']->height; ?>
<?php endif; ?>" maxlength="3" class="text clearIt" onkeypress="javascript: checkPointKey(event);" />
        </div>
        <div class="userInput">
        	<label>Cân nặng (kg):</label>
            <input type="text" name="pweight" id="pweight" value="<?php if (isset ( $_SESSION['st_weight'] )): ?><?php echo $_SESSION['st_weight']; ?>
<?php else: ?><?php echo $this->_tpl_vars['objUser']->weight; ?>
<?php endif; ?>" maxlength="3" class="text clearIt" onkeypress="javascript: checkPointKey(event);" />
        </div>        
        <div class="userInput">
        	<input type="submit" value="Thay đổi" class="btn" />
            <input type="button" value="Hủy" class="btn" onclick="javascript:basicClose('<?php echo $this->_tpl_vars['strView']; ?>
','<?php echo $this->_tpl_vars['strEdit']; ?>
')" />
        </div>
    </div>
</form>
<script type="text/javascript" language="javascript" src="<?php echo @HOST_STATICS; ?>
js/library/init.js"></script>
<?php echo '
<script type="text/javascript" language="javascript">
	$(document).ready(function(){		
		$("#frmBMI").validate({							
			errorClass		: \'errorMessage\',
			errorElement	: \'span\',
			onfocusout		: false,
			onkeyup			: false,
			rules: {	
				pheight:{
					required	: true,
					min			: 50
				},
				pweight: {
					required	: true,
					min			: 30
				}
				
			},
			messages: {	
				pheight:{
					required	: height_required,
					min			: height_min
				},
				pweight: {
					required	: weight_required,
					min			: weight_min
				}
			},		
			errorPlacement: function(label, element) {			
				var id = element.attr(\'id\');			
				label.insertAfter($(\'#\' + id));			
			},
			submitHandler: function(form) {				
				form.submit();
			}
		});		
	});
	showOther = function(intValue) {
		if(intValue == -1) {
			$(\'.secOther\').show();
		}
		else {
			$(\'.secOther\').hide();
		}
	}
</script>
'; ?>